﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Wap/Shop/ShopSite.Master" AutoEventWireup="true" CodeBehind="MemberDefault.aspx.cs" Inherits="ZLCMS.Web.Wap.Shop.MemberDefault" %>
<%@ Register src="Footer.ascx" tagname="Footer" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
   <style type="text/css">
    .ui-icon-carat-r:after{ background:url(images/usercenter_righticon.png) no-repeat right center; background-size:12px;}
	.ui-content .ui-listview, .ui-panel-inner > .ui-listview{ margin:0; box-shadow:none;}
	.userbox .ui-btn.ui-btn-icon-right.ui-icon-carat-r{ padding-left:0;}
	.user_center .top li p a{ color:#666; font-family:"微软雅黑"; font-size:12px; font-weight:normal;}
	.user_center .top li p a span{ color:#ff3638;}
	.userbox li .position{width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 100px;
    background: #ff3638;
    color: #fff;
    font-weight: normal;
    font-family: "微软雅黑";
    text-align: center;
    margin-left: 100px;
    font-size: 12px;}
    .myGrade{
            position:fixed!important;
            right:-10px;
            top:60px;
            font-size: 13px;
            color: #e22624;
            width: 60px;
            background-size: 25% 60%;
            text-align: center;
            height: 18px;
            line-height: 20px;
            font-weight:700;
            animation:mymoves 1s infinite;
            -webkit-animation:mymoves 1s infinite;
    }
    @keyframes mymoves
        {
        from {top:60px;}
        to {top:45px;}
        }

    @-webkit-keyframes mymoves
        {
        from {top:60px;}
        to {top:45px;}
        }
    </style>
    <title>个人中心</title>
    <link href="css/Membercenter.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pages" runat="server">
<!--S page -->
<div data-role="page" id="mypage" class="meberdefault">

	<!--S header -->
	<div data-role="header">
	</div>
    <!--E header -->
	
    <!--S content -->
	<div role="main" class="ui-content">
       
		<!--s user_center-->
        <div class="user_center loaderHandler ">
        	<ul class="top">
              	<li class="PhotoUrl"><div class="name"><img prop="Data.PhotoUrl" src="images/user_name.jpg"></div></li>
                <li onclick="location.href='/Wap/Shop/MemberCenter.aspx'">
                    <h2 prop="Data.MemberName">&nbsp;</h2>
                    <p class="LevelName"><span prop="Data.LevelName" style="margin-left: 5px;font-size:13px"></span>></p>
                    <p style="display:none"><a href="/wap/member/ScoreLogList.aspx" data-ajax="false">积分：<span prop="Data.Score">0</span></a></p>
                </li>
                <li onclick="location.href='/wap/member/MessageIndex.aspx'" class="membersay"><img src="images/home_icon_style2/say.png" alt="消息" /><%=UnReadNotice > 0 ? "<i>" + UnReadNotice + "</i>" : ""%></li>
                <li onclick="location.href='/Wap/Shop/MemberCenter.aspx'" class="Coins">我的积分:<span prop="Data.Coins" class="mycoins"></span></li>
                <li class="Grade"><img prop="Data.Level"/></li>
                <li class="Grade2" prop=IsSign><img src="images/home_icon_style2/qiandaoactive.gif"/></li>
                <li class="myGrade" style="display:none">
                </li>
           </ul>

			<!--s navbar-->
            <div class="navbar">
              <div class="headtips ui-icon-carat-r"><a href="OrderList.aspx" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/icon_allo.png');"></span>全部订单</a></div>
              <ul>
                <li><a href="OrderList.aspx?stat=pay" data-ajax="false"><img src="images/home_icon_style2/icon_pay.png"><div class="position" prop="UnpayCounter"></div><p>待付款</p></a></li>
                <li><a href="OrderList.aspx?stat=shipping" data-ajax="false"><img src="images/home_icon_style2/icon_shipping.png"><div class="position" prop="UnsignCounter"></div><p>待收货</p></a></li>
                <li><a href="CommentCenter.aspx?cs=0" data-ajax="false"><img src="images/home_icon_style2/icon_comment.png"><p>待评价</p></a></li>
                <li><a href="ReturnablesList.aspx"  data-ajax="false"><img src="images/home_icon_style2/icon_return.png"><p>申请售后</p></a></li>
              </ul>
            </div>
            <!--e navbar-->
                        
            <div class="userbox">
                <ul data-role="listview">
                  <li><a href="AddressList.aspx" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/icon_addr.png');"></span>收货地址</a></li>


                  <li><a href="/Wap/Member/CuponList.aspx" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/icon_cupon.png');"></span>我的优惠券<span class="position" prop="CouponCounter"></span></a></li>

                  
                  <li><a href="/Wap/Member/CuponList.aspx?type=5" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/icon_cupon.png');"></span>我的现金红包</a></li>


<%--                  <li><a href="/wap/member/CommentList.aspx" data-ajax="false">我的评价</a></li>--%>
<%--                  <li><a href="ReturnsList.aspx" data-ajax="false">退换记录</a></li>
                  <li><a href="/wap/member/FavoriteList.aspx" data-ajax="false">我的收藏</a></li>--%>
                </ul>
            </div>

            <div class="userbox">
                <ul data-role="listview">
<%--                  <li><a href="#" data-ajax="false">修改资料</a></li>--%>
<%--                  <li><a href="/wap/member/Setting.aspx" data-ajax="false">设置</a></li>--%>
                  <li onclick="location.href='MemberCenter.aspx'"><a data-ajax="false"><span style="background-image: url('./images/home_icon_style2/vip.png');"></span>会员特权</a></li>
                  <li><a href="FormDisplay.aspx?formid=5" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/feekback.png');"></span>意见反馈</a></li>
                </ul>
            </div>

            <div class="userbox">
                <ul data-role="listview">
                  <li><a href="ModuleView.aspx?uid=SHOP_HELP_WGSM" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/icon_notice.png');"></span>购物说明</a></li>
                  <li><a href="ModuleView.aspx?uid=SHOP_HELP_CJWT" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/icon_help.png');"></span>常见问题</a></li>
<%--                  <li><a href="/Wap/Web/FormDisplay.aspx?formid=5" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/icon_feeback.png');"></span>意见反馈</a></li>--%>
                </ul>
            </div>
            	
            <div class="userbox">
                <ul data-role="listview">
                  <li><a href="KFList.aspx" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/icon_tel.png');"></span>在线客服</a></li>
                  <li><a href="http://gdtv.haowanbao.net/wap/deptinfo/deptinfo.aspx?formid=6" data-ajax="false"><span style="background-image: url('./images/home_icon_style2/Business.png');"></span>商务合作</a></li>
                </ul>
            </div>
                		
        </div>
        <!--e user_center-->
    <!--悬浮图标
    <a href="https://cms.weixinmvp.com/Mass/170420dianqing/" id="gokill"  onclick="_hmt.push(['_trackEvent', 'member|null|miaosharukou|0|0', 'click', 'member'])"><img src="images/killrukou.png"></a>-->
 	</div>
    <!--E content -->
	
    <!--S footer -->
	<div data-role="footer" data-position="fixed" data-tap-toggle="false">
    
                <uc1:Footer ID="Footer1" runat="server"  MenuId="M"/>    
    </div>
    <!--E footer -->
</div>
<!--E page -->
<script>
    var _hmt = _hmt || [];
</script>
<script src="/wap/lib/common/loaderHandler.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        var handler = $('.loaderHandler').loaderHandler();
        handler.initialize({ command: 'Member.LoadMemberDetail', parameter: { MemberAccount: '<%=CurrentMemberAccount %>' },
            afterHandleResult:function (result,totalCount,container) {
                var _mylever = result.Data.Level;
                switch (_mylever){
                    case 1:
                        $('.Grade').hide();
                        $('.LevelName').css("background","#b3b3b3");
                      break;
                    case 2:
                        $('.Grade').show().children('img').attr('src','images/home_icon_style2/level1.png');
                      break;
                    case 3:
                        $('.Grade').show().children('img').attr('src','images/home_icon_style2/level2.png');
                      break;
                    case 4:
                        $('.Grade').show().children('img').attr('src','images/home_icon_style2/level3.png');
                      break;
                }
            },
        });
        handler.load();
    });

    $('[prop=UnpayCounter]').off('valuechange').on('valuechange', function (event, param) {
        if (param.value == 0) {
            $(this).hide();
        }
        $(this).html(param.value);
        $(event.target).triggerHandler('valuechanged', param);
        return false;
    });

    $('[prop=UnsignCounter]').off('valuechange').on('valuechange', function (event, param) {
        if (param.value == 0) {
            $(this).hide();
        }
        $(this).html(param.value);
        $(event.target).triggerHandler('valuechanged', param);
        return false;
    });
    $('[prop=CouponCounter]').off('valuechange').on('valuechange', function (event, param) {
        if (param.value == 0) {
            $(this).hide();
        }
        $(this).html(param.value);
        $(event.target).triggerHandler('valuechanged', param);
        return false;
    });

    $('[prop=IsSign]').off('valuechange').on('valuechange', function (event, param) {
        if (param.value) {
            $('.Grade2 img').attr('src', "images/home_icon_style2/qiandao.png").unbind("click");
        }
       
        $(event.target).triggerHandler('valuechanged', param);
        return false;
    });

    $('[prop=Data\\.PhotoUrl]').bind('valuechange', function (event, param) {
        try {
            var imgs = $.parseJSON(param.value);
            if (imgs instanceof Array) {
                $(event.target).attr('src', imgs[0].FilePath);
            } else {
                $(event.target).attr('src', imgs.FilePath);
            }
            $(event.target).triggerHandler('valuechanged', param);
        } catch (error) {
            
        }
        return false;
    });

    $('[prop=Data\\.Level]').bind('valuechange', function (event, param) {
        $(event.target).attr('src', "images/home_icon_style2/level" + param.value + ".png");
        $(event.target).triggerHandler('valuechanged', param);
        return false;
    });

    //签到
    $('.Grade2 img').click(function () {
        $('.Grade2 img').unbind("click");
        var oldcoins = $('.mycoins').text()
        var $that = $(this);
        $that.executeCommand({ successCallBack: function (result) {
            if (result.Data) {
                $that.attr('src', "images/home_icon_style2/qiandao.png");
                $('.myGrade').text('+' + result.Data.Coins);
                $('.myGrade').show();
                $('.mycoins').text(Number(oldcoins) + result.Data.Coins)
                setTimeout(function () {
                    $('.myGrade').hide();
                }, 1000)
                setTimeout(function () {
                    $('.myGrade').css("animation", "mymoves 0s infinite")
                }, 3000)
            }else{
                    $('.myGrade').css("animation", "mymoves 0s infinite")
            }
        }
        },
        'Member.SignInCommand', {});
    })

    $(document).ready(function () {
        $.cookie('After', $.cookie('CurrentPage'));
        $.cookie('CurrentPage', 'member');
        var After = $.cookie('After');
        var Current = $.cookie('CurrentPage');
        //保存统计记录
        var path = 'member|path|' + Current + '|' + After;
        _hmt.push(['_trackEvent', path, 'enter', 'member'])
        _hmt.push(['_trackEvent', 'page', 'view', 'member'])
    });
</script>
</asp:Content>
